home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Developer Utilities / Installer 4.0.3 SDK / Script Examples / Install PowerMac [ compressed ] / CheckIfInternalRuleFunc.c next >
Encoding:
C/C++ Source or Header  |  1994-11-15  |  607 b   |  20 lines  |  [TEXT/MPS ]

  1. #include    <Files.h>
  2. #include    "RuleFunctionHeader.h"
  3.  
  4. long CheckIfInternalRuleFunc( RuleFunctionPBPtr    theRuleFuncPBPtr )
  5. {
  6.     HParamBlockRec    volInfoPBRec;
  7.     OSErr            err;
  8.     
  9.     volInfoPBRec.volumeParam.ioResult         = noErr;
  10.     volInfoPBRec.volumeParam.ioCompletion     = 0;
  11.     volInfoPBRec.volumeParam.ioNamePtr         = 0L;
  12.     volInfoPBRec.volumeParam.ioVRefNum         = theRuleFuncPBPtr->fTargetVRefNum;
  13.     volInfoPBRec.volumeParam.ioVolIndex     = 0;        
  14.     err = PBHGetVInfo( &volInfoPBRec, 0 );
  15.  
  16.     if( err == noErr && volInfoPBRec.volumeParam.ioVDRefNum == -33 )
  17.         return kTRUERuleFunctionResult;
  18.     else         
  19.         return kFALSERuleFunctionResult;
  20. }